www.gusucode.com > 婚庆仪礼策划公司网站系统源代码 梦紫色 > 婚庆仪礼策划公司网站系统源代码 梦紫色/Admin/admin_ly.asp

    <!--#include file="conn.asp"-->
<!--#include file="inc/format.asp"-->


<head>
<!--#include file = language.asp -->
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>
<%
if session("admin_flag")<>"into" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='login.asp' target='_parent' >重新登录</a>!"
  Call diserror()
  response.End
end if
%>
<BR>
<%
viewid=trim(request("viewid"))
delid=trim(request("delid"))
hyid=trim(request("hyid"))
shid=trim(Request("shid"))
sh=trim(Request("sh"))
content=trim(request("content"))
addtime=date()

if shid<>"" and sh<>"" then
	conn.Execute "update [ly] set [sh]="&sh&" where id="&clng(shid)
end if
if hyid<>"" and content<>"" then
  userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
  If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
  Set rs2 = Server.CreateObject("ADODB.RecordSet")
  rs2.Open "select * from [lyhf] where lyid="&hyid&" order by id desc",conn,1,3
  if rs2.recordcount=0 then
    conn.Execute "insert into [lyhf] ([lyid],[content],[addtime],[tx],[ip]) values('"&hyid&"','"&content&"','"&addtime&"','../images/ly-00.gif','"&userip&"')"
  else
    rs2("content")=content
    rs2("addtime")=now()
    rs2.update
  end if
end if
if delid<>"" then
   conn.Execute "delete from [ly] where ID="&CInt(delid)
   conn.Execute "delete from [lyhf] where lyID="&CInt(delid)
end if 

 
if viewid<>"" then

	Set rs = Server.CreateObject("ADODB.RecordSet")
	rs.Open "select * from [ly] where id="&viewid&" order by id desc",conn,1,1
	if rs.recordcount<>0 then
	
	lb=rs("lb")
	if (not isNumeric(lb)) then
		lb=0
	end if
	set rs2 = Server.CreateObject("ADODB.RecordSet")
	rs2.Open "select * from [lylb] where id="&lb&" order by id desc",conn,1,1
	while not rs2.eof
		lb=rs2("lb")
	rs2.movenext
	wend
	rs2.close:set rs2=nothing

%>
	<table align=center border="1" cellpadding="5" width="700" id="table2" style="border-collapse: collapse" bordercolor="#C0C0C0" bgcolor="#FFFFFF">
		<tr>
			<td width="700" align="center" background="../images/bg1.gif" colspan="2">
			 <font color="#FFFFFF"><%=rs("title")%></font><font color="#FFFF00">(<%=lb%>)</font></td>
		</tr>
		<tr>
			<td width="201" align="center" style="line-height: 150%" valign="top"><img border=1 src=../<%=rs("tx")%>>
			<div align="center">
			<table border="0" cellpadding="2" cellspacing="0" width="201" id="table3">
			<tr>
			<td width="74" align="right">姓名:</td>
			<td width="127"><%=rs("adduser")%></td>
			</tr>
			<tr>
			<td width="74" align="right">来自:</td>
			<td width="127"><%=rs("ip")%></td>
			</tr>
			<tr>
			<td width="74" align="right">邮箱:</td>
			<td width="127"><a href="mailto:<%=rs("email")%>"><img border="0" src="../images/lymail.gif" width="16" height="16"></a></td>
			</tr>
			<tr>
			<td width="74" align="right">时间:</td>
			<td width="127"><%=rs("addtime")%></td>
			</tr>
			</table>
	</div>
			</td>
			<td width="476" valign="top"><%=rs("content")%></td>
		</tr>
		<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="VBScript" Type="text/vbscript"><!--
function FrontPage_Form1_onsubmit()
  Set theForm = document.FrontPage_Form1

  If (theForm.content.value = "") Then
    MsgBox "请在 回复 域中输入值。", 0, "有效性验证错误"
    theForm.content.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.content.value) < 1) Then
    MsgBox "在 回复 域中,请至少输入 1 个字符。", 0, "有效性验证错误"
    theForm.content.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If
  FrontPage_Form1_onsubmit = True 
End Function
--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="admin_ly.asp?hyid=<%=viewid%>" name="FrontPage_Form1"><tr>
			<td width="677" align="center" style="line-height: 150%" valign="top" colspan="2">
			<%
			Set rs2 = Server.CreateObject("ADODB.RecordSet")
			rs2.Open "select * from [lyhf] where lyid="&viewid&" order by id desc",conn,1,1
			if rs2.recordcount<>0 then
			  content=rs2("content")
			end if
			%>
				<p>
				&nbsp;<!--webbot bot="Validation" s-display-name="回复" b-value-required="TRUE" i-minimum-length="1" --><textarea rows="9" name="content" cols="96"><%=content%></textarea><br>
				<input type="submit" value="提交" name="B1">&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="重置" name="B2"></p>
			
			</td>
		</tr></form>
	</table>
<%
end if 

end if
%>
<BR>
<BR>
</p>
<div align="center">
	<table border="1" cellpadding="4" width="700" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0">
		<tr>
		  <td width="729" align="center"  height="25" colspan="3"><strong>留言管理</strong></td>
		</tr>	
		<tr>
			<td background="../images/bj5.jpg" align="center" width="362">
			<font color="#FFFFFF">标&nbsp;&nbsp; 题</font></td>
			<td background="../images/bj5.jpg" align="center" width="199">
			<font color="#FFFFFF">发布者和时间</font></td>
			<td background="../images/bj5.jpg" align="center" width="111">
			<font color="#FFFFFF">操&nbsp; 作</font></td>
		</tr>
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [ly]  order by id desc",conn,1,1

if rs.recordcount<>0 then

page=int(request("page"))
rs.PageSize=10
pagecount=rs.pagesize
if page<=0 then page=1
if request("page")="" then page=1
rs.AbsolutePage=page

for i=1 to pagecount
sh=rs("sh")
%>
		<tr>
			<td width="362">
			<%
			  if rs("bm")="1" then Response.Write "[保密]"
			
			Response.Write rs("title")
			
			lb=rs("lb")
			if (not isNumeric(lb)) then
				lb=0
			end if
			set rs2 = Server.CreateObject("ADODB.RecordSet")
			rs2.Open "select * from [lylb] where id="&lb&" order by id desc",conn,1,1
			if rs2.recordcount<>0 then
				Response.Write "<font color=red>("&rs2("lb")&")</font>"
			end if
			rs2.close:set rs2=nothing
			%>
			<br>
			<a href="admin_ly.asp?viewid=<%=rs("id")%>"><font color="#C0C0C0"><%=rs("content")%></font></a></td>
			<td width="199"><%=rs("adduser")%>&nbsp;<a href='http://www.xuas.com/other/ip3.asp?iP=<%=rs("ip")%>' target='IP3'><%=rs("Email")%>(电话)</a></acronym><br><%=rs("addtime")%></td>
			<td width="111" align=center>
			<%
			Set rs2 = Server.CreateObject("ADODB.RecordSet")
			rs2.Open "select * from [lyhf] where lyid="&rs("id")&" order by id desc",conn,1,1
			if rs2.recordcount<>0 then
			   Response.Write "已经回复&nbsp;"
			else
			   Response.Write "没有回复&nbsp;"
			end if
			rs2.close:set rs2=nothing
			
				if sh=1 then Response.Write "<a href=admin_ly.asp?shid="&rs("id")&"&sh=0>已经审核</a>"
				if sh=0 then Response.Write "<a href=admin_ly.asp?shid="&rs("id")&"&sh=1>没有审核</a>"
			%>
			<BR>
			<a href="?viewid=<%=rs("id")%>">查看回复</a>  

			<a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="admin_ly.asp?delid=<%=rs("id")%>">删除</a></td>
		</tr>
<%
rs.movenext
if rs.eof then exit for
next
else
  Response.Write "<tr><td colspan=3>暂无信息</td></tr>"
end if
%>
	</table>
</div>
<BR>
<center>
<%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1&lm="&trim(request("lm"))&"&lb="&trim(request("lb"))&"&word="&trim(request("word"))&">首页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&lm="&trim(request("lm"))&"&lb="&trim(request("lb"))&"&word="&trim(request("word"))&">上一页</a> "
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&lm="&trim(request("lm"))&"&lb="&trim(request("lb"))&"&word="&trim(request("word"))&">下一页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&lm="&trim(request("lm"))&"&lb="&trim(request("lb"))&"&word="&trim(request("word"))&">尾页</a> "
  end if
    response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
  %>
  <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
  </script>
  <select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
   <%for i=1 to rs.pagecount%>
   <option value="<%=request.servervariables("URL")%>?page=<%=i%>&lm=<%=trim(request("lm"))%>&lb=<%=trim(request("lb"))%>&word=<%=trim(request("word"))%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
    <%next%>
</select>
<%end if%>

<br>
<br><br></p>
<center>
<%
if xuasmdb<>"" then
%>

<%
end if
%>
</center>